home *** CD-ROM | disk | FTP | other *** search
/ The Sunday Times: The Month 2003 December / The Sunday Times - The Month 2003-12.iso / mac / The Month DEC 03 / engine / modules / thumbs_tall.swf / scripts / DefineSprite_6 / frame_1 / DoAction.as
Text File  |  2003-11-10  |  781b  |  34 lines

  1. function init()
  2. {
  3.    num = _name.split("_")[2];
  4.    var nd = _parent._parent.nodeData.childNodes[num];
  5.    link = nd.attributes.link;
  6.    _parent._parent.addLink(this,link);
  7.    titleFF.htmlText = nd.byName("thumbtitle").getText();
  8.    titleFF.textColor = _parent._parent.DEFAULT_COLOR;
  9.    imgToCheck = eval("_parent.mc_img_" + num);
  10.    intervalID = setInterval(checkLoad,300,this);
  11.    if(link == null)
  12.    {
  13.       activeBtn.useHandCursor = false;
  14.    }
  15. }
  16. function checkLoad(mc)
  17. {
  18.    if(imgToCheck._height > 0)
  19.    {
  20.       if(!positioned)
  21.       {
  22.          positioned = true;
  23.          _parent._parent.positionElements(mc);
  24.          clearInterval(intervalID);
  25.       }
  26.    }
  27. }
  28. this.onUnload = function()
  29. {
  30.    clearInterval(intervalID);
  31. };
  32. init();
  33. delete init;
  34.